package comm

/*
support proxy https headers
Author : clark 2015-11-26
*/

import (
	"fmt"
	"io/ioutil"
	//"log"
	"net/http"
)

//Empty null function
func Empty() {
	fmt.Printf("Null\n")
}

//GetWebPage just get webpage content
func GetWebPage(url string) ([]byte, error) {
	res, err := http.Get(url)
	if err != nil {
		//log.Fatal(err)
		return nil, err
	}
	bodyBytes, err := ioutil.ReadAll(res.Body)
	defer res.Body.Close()
	if err != nil {
		//log.Fatal(err)
		return nil, err
	}
	//fmt.Printf("Get %s finished\n", url)
	return bodyBytes, nil
}
